import { stringify } from 'qs';
import request from '@/utils/request';
export async function queryComponentList(payload) {
  const { params, url } = payload;
  return request(`/server/api/${url}`, {
    method: 'POST',
    body: params,
  });
}

export async function queryOwnCompany() {
  return request(`/server/api/mds/d-customer/selectCompany`, {
    method: 'POST',
    body: {},
  });
}

export async function querytDictByCode(params) {
  return request(`/server/api/mds-dict-data/selectDictByCode`, {
    method: 'POST',
    body: params,
  });
}
//获取用户可以为哪些客户下单:
export async function getCustomerList(params) {
  if (!params.token) return;
  return request(`/server/api/api/User/User/GetCustomerList?${stringify(params)}`, {
    method: 'POST',
    body: params,
  });
}
